import React from "react";
class List extends React.Component<any,any>{
    constructor(props:any){
        super(props)
        this.state={
            todo:['学vue3','学react','上班','赚钱','生活']
        }
    }

    render(): React.ReactNode {
        let lis:Array<React.ReactNode>=this.state.todo.map((item:string,index:number)=>{
            return <li key={index}>{item}</li>
        })
        return(
            <fieldset>
                <legend>列表</legend>
                <ul>
                    {lis}
                </ul>
            </fieldset>
        )
    }
}

export default List